/**
 * @file display.h
 * @author taylor peng
 * @brief 
 * @version 0.1
 * @date 2021-12-27
 * 
 * @copyright Copyright (c) 2021
 * 
 */
#ifndef __DISPLAY_H__
#define __DISPLAY_H__


#include <stdint.h>
#include <string.h>
#include <stdbool.h>
#include "common.h"

#define PAGE_CEN            1u
#define START_CEN           64u

#define START_1             0u
#define START_2             (START_1 + 12u)
#define START_3             16u

#define     PAGE_ONE                            0
#define     PAGE_TWO                            2
#define     PAGE_THREE                          4
#define     PAGE_FOUR                           6
#define     PAGE_MIDLE                          3
#define     PAGE_BASE                           2
#define     PAGE_BOTTOM                         8

#define     START_ONE                          0
#define     START_TWO                          8U
#define     START_THREE                        16U
#define     START_FOUR                         24U
#define     START_FIVE                         32U
#define     START_SIX                          40U
#define     START_SEVEN                        48U
#define     START_EIGHT                        56U
#define     START_NINE                         64U
#define     START_TEN                          72U
#define     START_ELEVEN                       80U
#define     START_TWELVE                       88U
#define     START_THIRTEEN                     96U
#define     START_FOURTEEN                     104U
#define     START_FIFTEEN                      112U
#define     START_SIXTEEN                      120U
#define     START_BASE                         8U

#define ASCII_SPACE                     0x20
#define ASCII_NULL                      0x00
#define ASCII_AND                       0x26
#define ASCII_NUMBASE                   0X30
#define ASCII_STAR                      0X2A
#define ASCII_MIDDLELINE                0X2D
#define ASCII_BOTTOMLINE                0X5F
#define ASCII_STOP                      0X3A
#define     LINE_BASE                           2U   //行基准
#define     ROW_BASE                         8U   //列基准

#define    LINE_TOP                     0X01
#define     LINE_IDLE                               0X40
#define     LINE_NUM                                0X80
#define    LINE_STRING_MAX              16 //一行最多显示16字符

void Disp_Welcome(uint8_t len, uint8_t level);
void Disp_Idle(uint8_t cnt, uint8_t len, uint8_t flg, uint8_t level, uint8_t *time);
//请放手指
void Disp_Input_Finger(void);
//请正对摄像头
void Disp_No_Administrator(void);
void Disp_Motor_Driver_Level(uint8_t param);
void Disp_Face_Camera(void);
void Disp_Face_Up(void);
void Disp_Face_Down(void);
void Disp_Face_Left(void);
void Disp_Face_Right(void);
void Disp_FaceFull(void);
void Disp_No_Face(void);
//移开手指再放一次
void Disp_FingerAgain(void);
//验证错误
void Disp_Identify_Fail(void);
//验证错误
void Disp_Identify_Sucess(uint8_t type, uint16_t uid);
//非法操作 系统已锁定
void Disp_System_Lock(uint8_t type, uint16_t time);
//存量已满
void Disp_UserFull(void);
//指纹已满
void Disp_FingerFull(void);
//卡已满
void Disp_CardFull(void);
//密码已满
void Disp_PasswordFull(void);
//操作错误
void Disp_OperaFail(void);
//操作成功
void Disp_OperaSuccess(void);
void Disp_Encrypting(void);
void Disp_NoUser(void);
void Disp_No_Finger(void);
void Disp_No_Password(void);
void Disp_No_Card(void);
void Disp_NoneRecord(void);
//请稍后。。。
void Disp_Input_Admin(uint8_t type);
void Disp_Test(uint16_t data, uint8_t u8x, uint8_t u8y);
void Disp_Set_Param(uint16_t param, char *eng_words);
void Disp_Set_Face_Sensitivity(uint8_t param);
void Disp_Input_ManageInfo(unsigned char len, unsigned char flg);
void Disp_Input_Password_Again(uint8_t len);
void Disp_Add_Sucess(uint8_t type, uint16_t uid);
void Disp_Add_Fail(void);
void Disp_Delete_Fail(void);
void Disp_Delete_Sucess(void);
void Disp_Password_Easy(void);
void Disp_Set_Fail(void);
void Disp_Set_Sucess(void);
void Disp_FactoryReset_Sucess(void);
void Disp_UserExist(void);
void Disp_Wait(void);
void Disp_Unlock(void);
void Disp_Lock(void);
void Disp_Unlocking(void);
void Disp_Locking(void);
void Disp_Input_KeyValue(uint8_t len, uint8_t *pw);
void Disp_Opera_ALLUser(uint8_t type);
void Disp_InSure_Cancel(void);
void Disp_Opera_Finger_Password(uint8_t type);
void Disp_OpRecord(uint8_t operate, uint8_t utype, uint16_t id, uint8_t time[]);
void Disp_Opera_Finger_Card(uint8_t type);

void Disp_Opera_Password_Card(uint8_t type);

void Disp_Opera_Finger(uint8_t type);

void Disp_Opera_Password(uint8_t type);

void Disp_Opera_Card(uint8_t type);
//常开已打开
void Disp_AlwaysOn(void);
//常开已关闭
void Disp_AlwaysOff(void);
void Disp_Ver(char *ver);
//单开模式
void Disp_SingleMode(void);
//双开模式
void Disp_DouobleMode(void);
//恢复出厂设置
void Disp_Factory(void);
void Disp_test_Mode(uint8_t status);
void Disp_Burn_In(uint16_t count, uint32_t current);
void Disp_Menu_First(uint8_t select, uint8_t max);
void Disp_Menu_Add_User(uint8_t select, uint8_t max);
void Disp_Menu_Delete_User(uint8_t select, uint8_t max);
void Disp_Menu_Delete_Users(uint8_t select, uint8_t max);
void Disp_Menu_System_Setting(uint8_t select, uint8_t max);
void Disp_Menu_Install_Param_Set(uint8_t select, uint8_t max);
void Disp_Menu_Net_Config(uint8_t select, uint8_t max);
void Disp_Set_Time(uint8_t flg, uint8_t len, uint8_t *ptr);
void Disp_Ctrl(uint32_t time, Func func);
void Disp_App_Init(void);
void Disp_Sleep(void);
void Disp_Menu_Init(void);
uint8_t Disp_Menu_Add(uint8_t menuid);
void Disp_Menu_Show(uint8_t select);

#endif /* __DISPLAY_H__ */
